<template>
  <div>
    <table>
      <tr v-for="(g,index) in goods" v-bind:key="index">
        <td>
          {{g.id}}
        </td>
        <td>
          {{g.name}}
        </td>
      </tr>
    </table>
  </div>
</template>
<script>

export default ({
  data(){
    return{
      goods:[]
    }
  },
  created(){
    //发送请求获取数据
    this.axios.get(this.baseUrl+"goods/all")
    .then((res) => {

      //
      console.log(res.data);
      //res.data  ResponseResult
      this.goods = res.data.data;
      //

    });
  }
})
</script>
